﻿using SmartSiteManagementSystem.Models.Material;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;

namespace SmartSiteManagementSystem.IServices
{
    public interface IMaterialService
    {
        #region MaterialInfo
        /// <summary>
        /// 
        /// </summary>
        /// <param name="materialId"></param>
        /// <returns></returns>
        MaterialInfo GetMaterialInfoById(int materialId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="materialInfo"></param>
        /// <returns></returns>
        bool UpdateMaterialInfo(MaterialInfo materialInfo);


        /// <summary>
        /// 
        /// </summary>
        /// <param name="materialInfo"></param>
        /// <returns></returns>
        int InsertMaterialInfo(MaterialInfo materialInfo);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="catalogId"></param>
        /// <returns></returns>
        int GetMaterialInfoCountByCatalogId(int catalogId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        int GetMaterialInfoListCount(Hashtable param);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="param"></param>
        /// <param name="orderBy"></param>
        /// <param name="first"></param>
        /// <param name="rows"></param>
        /// <returns></returns>
        IList<MaterialInfo> GetMaterialInfoList(Hashtable param, string orderBy, int first, int rows);
        #endregion

        #region MaterialCatalogInfo
        /// <summary>
        /// 
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        int InsertMaterialCatalogInfo(MaterialCatalogInfo obj);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        IList<MaterialCatalogInfo> GetMaterialCatalogInfoList(Hashtable param);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="catalogId"></param>
        /// <returns></returns>
        MaterialCatalogInfo GetMaterialCatalogInfoById(int catalogId);

        /// <summary>
        /// 得到某分类下的分类列表
        /// </summary>
        /// <param name="cateId">父类id</param>
        /// <returns></returns>
        IList<MaterialCatalogInfo> GetCatalogChildList(int cateId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="catalogId"></param>
        /// <returns></returns>
        IList<MaterialCatalogInfo> GetChildListStopC(int catalogId);


        /// <summary>
        /// 得到分类Id集合下的分类列表 
        /// </summary>
        /// <param name="cateIds">父类id计划 用,号隔开</param>
        /// <returns></returns>
        IList<MaterialCatalogInfo> GetCatalogChildList(string cateIds);


        /// <summary>
        /// 根据子分类id获取父分类ID的字符
        /// (最多可以获取5级深度)
        /// </summary>
        /// <param name="catalogId"></param>
        /// <returns>返回格式如：4,5,8,10</returns>
        string GetParentCatalogIds(int catalogId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="catalogId"></param>
        /// <returns></returns>
        IList<MaterialCatalogInfo> GetParents(int catalogId);


        /// <summary>
        /// 
        /// </summary>
        /// <param name="catalogId"></param>
        /// <param name="parentId"></param>
        /// <returns></returns>
        bool DeleteMaterialCatalog(int catalogId, int parentId);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        bool UpdateMaterialCatalogInfo(MaterialCatalogInfo obj);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        bool UpdateMaterialCatalogInfo(Hashtable param);

        #endregion
    }
}
